#ifndef _HANDWRITE_H
#define _HANDWRITE_H

#include "stroke.h"
#include <dbus/dbus-glib.h>
#include "service.h"

#define HAND_BUTTON_NUM	16
#define HAND_WORD_NUM 64

#define DEBUG  1
#ifdef DEBUG
#define dbg(txt, args... ) fprintf(stderr, "SHUOXIE-DEBUG: " txt , ##args )
#else
#define dbg(txt, args... ) /* nothing */
#endif


typedef struct _ShuoXie
{
	GtkWidget *window;	
	GtkWidget *hand_fixed;
	GtkWidget *hand_button[HAND_BUTTON_NUM];	/* 显示字的按钮 候选字按钮 */
	DBusGConnection *bus;						/* D-BUS */


	Stroke *stk;

	int pagenum;								/* 当前字的页数 */
	gchar *value[HAND_WORD_NUM-1];				/* 当前的字 */
    DBusGProxy* proxy;
    ShuoXieService* service;
    int autoaddword;                            //自动新增
    int autobottom;                             //底部依靠
    int xfup;
    
    GdkColor bj_color;          //画板颜色
    GdkColor hb_color;          //画笔颜色
    float opacity;              //透明度
}ShuoXie;


#endif
